//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.tool.utils;

import java.util.Collection;
import java.util.Iterator;

public class StrUtils {
    public StrUtils() {
    }

    public static boolean isEmpty(String str) {
        DataUtil.dex();
        return str == null || str.trim().length() == 0;
    }

    public static boolean isNotEmpty(String str) {
        return !isEmpty(str);
    }

    public static String normalize(String str) {
        if(str == null) {
            return null;
        } else if(str.trim().length() == 0) {
            return str;
        } else {
            StringBuilder sb = new StringBuilder();
            sb.append(Character.toUpperCase(str.charAt(0)));
            sb.append(str.substring(1));
            return sb.toString();
        }
    }

    public static String join(Collection<? extends Object> coll, String separator) {
        if(coll != null && coll.size() != 0) {
            int i = 0;
            StringBuilder sb = new StringBuilder();
            Iterator var5 = coll.iterator();

            while(var5.hasNext()) {
                Object obj = var5.next();
                sb.append(obj.toString());
                if(i++ != coll.size() - 1) {
                    sb.append(separator);
                }
            }

            return sb.toString();
        } else {
            return "";
        }
    }

    public static String formatNull(String str) {
        return str == null?"":str;
    }
}
